#!/usr/bin/env python
# coding=UTF-8

import time,datetime

def write_log():
	with open("log.log" ,"a", encoding = "utf-8") as f:
		f.write("run at: %s \n" % datetime.datetime.now())

def main():
	while(True):
		write_log()
		print(datetime.datetime.now(), flush = True)
		time.sleep(2)


if __name__ == '__main__':
	print('__main__')
	main()